package com.fesine.ssh.util;

import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;

public class ResponseUtil {
	
	public static void write(HttpServletResponse resp,Object obj) throws Exception{
		//添加报文头
		resp.setContentType("text/html;charset=utf-8");
		//输出流操作
		PrintWriter out = resp.getWriter();
		out.println(obj.toString());
		out.flush();
		out.close();
	}
}
